(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["components-cafes-CafeCard-vue"],{

/***/ "./resources/assets/js/mixins/filters/CafeBrewMethodsFilter.js":
/*!*********************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeBrewMethodsFilter.js ***!
  \*********************************************************************/
/*! exports provided: CafeBrewMethodsFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeBrewMethodsFilter", function() { return CafeBrewMethodsFilter; });
var CafeBrewMethodsFilter = {
  methods: {
    processCafeBrewMethodsFilter: function processCafeBrewMethodsFilter(cafe, brewMethods) {
      // 如果冲泡方法不为空，则进行处理
      if (brewMethods.length > 0) {
        var cafeBrewMethods = []; // 将咖啡店所有冲泡方法都推送到 cafeBrewMethods 数组

        for (var i = 0; i < cafe.brew_methods.length; i++) {
          cafeBrewMethods.push(cafe.brew_methods[i].method);
        } // 遍历所有待处理冲泡方法，如果在 cafeBrewMethods 数组中则返回 true


        for (var i = 0; i < brewMethods.length; i++) {
          if (cafeBrewMethods.indexOf(brewMethods[i]) > -1) {
            return true;
          }
        } // 如果都不在 cafeBrewMethods 数组中则返回 false


        return false;
      } else {
        return true;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeHasMatchaFilter.js":
/*!*******************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeHasMatchaFilter.js ***!
  \*******************************************************************/
/*! exports provided: CafeHasMatchaFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeHasMatchaFilter", function() { return CafeHasMatchaFilter; });
var CafeHasMatchaFilter = {
  methods: {
    processCafeHasMatchaFilter: function processCafeHasMatchaFilter(cafe) {
      /*
        Checks to see if the cafe has matcha
      */
      if (cafe.matcha === 1) {
        return true;
      } else {
        return false;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeHasTeaFilter.js":
/*!****************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeHasTeaFilter.js ***!
  \****************************************************************/
/*! exports provided: CafeHasTeaFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeHasTeaFilter", function() { return CafeHasTeaFilter; });
var CafeHasTeaFilter = {
  methods: {
    processCafeHasTeaFilter: function processCafeHasTeaFilter(cafe) {
      /*
        Checks to see if the cafe has tea
      */
      if (cafe.tea === 1) {
        return true;
      } else {
        return false;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeInCityFilter.js":
/*!****************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeInCityFilter.js ***!
  \****************************************************************/
/*! exports provided: CafeInCityFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeInCityFilter", function() { return CafeInCityFilter; });
var CafeInCityFilter = {
  methods: {
    processCafeInCityFilter: function processCafeInCityFilter(cafe, cityID) {
      /*
        Checks to see if the cafe has tea
      */
      if (cafe.city_id === cityID) {
        return true;
      } else {
        return false;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeSubscriptionFilter.js":
/*!**********************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeSubscriptionFilter.js ***!
  \**********************************************************************/
/*! exports provided: CafeSubscriptionFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeSubscriptionFilter", function() { return CafeSubscriptionFilter; });
var CafeSubscriptionFilter = {
  methods: {
    /*
      Determines if the cafe has a subscription or not.
    */
    processCafeSubscriptionFilter: function processCafeSubscriptionFilter(cafe) {
      if (cafe.company.subscription === 1) {
        return true;
      } else {
        return false;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeTextFilter.js":
/*!**************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeTextFilter.js ***!
  \**************************************************************/
/*! exports provided: CafeTextFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeTextFilter", function() { return CafeTextFilter; });
var CafeTextFilter = {
  methods: {
    processCafeTextFilter: function processCafeTextFilter(cafe, text) {
      // 文本不为空时才会处理
      if (text.length > 0) {
        // 如果咖啡店名称、位置、地址或城市与给定文本匹配，则返回 true，否则返回 false
        if (cafe.company.name.match('[^,]*' + text + '[,$]*') || cafe.location_name.match('[^,]*' + text + '[,$]*') || cafe.address.match('[^,]*' + text + '[,$]*') || cafe.city.match('[^,]*' + text + '[,$]*')) {
          return true;
        } else {
          return false;
        }
      } else {
        return true;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeTypeFilter.js":
/*!**************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeTypeFilter.js ***!
  \**************************************************************/
/*! exports provided: CafeTypeFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeTypeFilter", function() { return CafeTypeFilter; });
var CafeTypeFilter = {
  methods: {
    processCafeTypeFilter: function processCafeTypeFilter(cafe, type) {
      switch (type) {
        case 'roasters':
          if (cafe.company.roaster === 1) {
            return true;
          } else {
            return false;
          }

          break;

        case 'cafes':
          if (cafe.company.roaster === 0) {
            return true;
          } else {
            return false;
          }

          break;

        case 'all':
          return true;
          break;
      }
    }
  }
};

/***/ }),

/***/ "./resources/assets/js/mixins/filters/CafeUserLikeFilter.js":
/*!******************************************************************!*\
  !*** ./resources/assets/js/mixins/filters/CafeUserLikeFilter.js ***!
  \******************************************************************/
/*! exports provided: CafeUserLikeFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CafeUserLikeFilter", function() { return CafeUserLikeFilter; });
var CafeUserLikeFilter = {
  methods: {
    processCafeUserLikeFilter: function processCafeUserLikeFilter(cafe) {
      if (cafe.user_like_count === 1) {
        return true;
      } else {
        return false;
      }
    }
  }
};

/***/ })

}]);